/* Declarations for data structure used in indexg_rep.

   Copyright (C) Liu Tao

   This library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Library General Public License
   as published by the Free Software Foundation; either version 2 of
   the License, or (at your option) any later version.

   This library is distributed in the hope that it will be useful, but
   WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Library General Public License for more details.

   You should have received a copy of the GNU Library General Public
   License along with this library; see the file COPYING.LIB.  If not,
   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
   Boston, MA 02111-1307, USA.  */

#ifndef __INDEXG_REP_H_
#define __INDEXG_REP_H_

#define char_encode(c) (c=toupper(c),((c=='A')?0:(c=='C')?1:(c=='T')?2:3)) /* convert sequence symbol to integar from 1 to 3*/
#define char_revencode(c) (c=toupper(c),((c=='A')?2:(c=='C')?3:(c=='T')?0:1)) /* convert sequence symbol to integar from 1 to 3*/
#define char_decode(c) ((c==0)?'A':((c==1)?'C':(c==2)?'T':'G')) /* convert encoded sequence value to character symbol */


/* hash value for index the whole genome */
typedef struct _index_value
{
  int chr;						/* chrosome number 1-22,X->-1,Y->-2 */
  long start;
  struct _index_value *next;			/* to the next */
} index_value;
  
#endif
